home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-25 | 3.4 KB | 70 lines | [TEXT/MPS ] |
- Translate is a dcmd (MacsBug command), which displays information
- relative to the way the PMMU will translate virtual addresses into
- physical addresses. It is an emulation of the command PTEST, but gives
- much more details. It is primarly for people who hack into their computer
- or program very subtle things which require physical addresses (anything
- that deals with a hardware device for instance). The normal end-user should
- not worry about this program.
-
- The output looks like this :
-
- Level Type Base Address Offset Desc Address Flags
- RP 4 Byte 00003CD0 0000 00003CD0
- A 4 Byte 0001A090 0050 0001A1D0 U
- B Page Desc 00050000 0016 00050016 M
-
- What does that mean ?
-
- Well, first the address is in memory, since the translation finishes
- by a "Page Descripto". And the address of the page is $50000, the
- translated address being $50016, which only includes the offset inside
- the page.
-
- The order of search is as follow : the CPU looks in a register called the
- Root Pointer (RP), and gets the address in memory of the first descriptor.
- This descriptor gives then another address of another descriptor, and it
- goes on until we reach a "Page Descriptor" or an "Invalid Descriptor". Being
- Invalid means that the page is not resident in memory at the moment.
-
- You can try with MacsBug to find a non resident page. Then try (still with
- MacsBug) to read at this address : you will hear the drive click, and if
- you ask for the translation again, you will see that the page now resides
- in memory. The same behavior happens with flags : if a page hasn't been
- used or modified (U and M flags), try reading or writing there. Automatically
- the flags will be updated. There are other flags (WP,CI…) but I never found
- any situation where they would appear. If you find one…
-
- The installation is very simple : just copy (with ResEdit) the resource "dcmd"
- of the file "Translate" into the file "Debugger's Prefs", which is in the
- System Folder. Then restart the Macintosh, and you have a new command available :
- type "help Translate" to get help. Don't care about the story CRP/SRP, it's not
- implemented.
-
- Translate needs to call certain privileged instructions, and has to access the
- Translation Table. On a protected system, it would be impossible for a normal
- program, so Translate cannot be a usual application. The only place on System 7
- where you still have privileges, is the Debugger. And that's a good place since
- Translate is usefull for debugging. Everything is fine.
-
- Translate v1.0ß1 is Beta : I have implemented all the things that are in the
- MC68030 manual, except that I don't check the transparent translation registers
- (TTx) and I don't care which root pointer I should use (the program always
- takes the CRP). But not everything that is simulated gets output : I only put
- messages in the most common cases, so I am very interested if there are things
- that are not printed, while you think they should be. I have tested this program
- with System 7.0ß4 on a MC68030, and it works fine for my system. I have no idea
- if it works with a MC68020/MC68851, or with Virtual, or under A/UX : I am
- interested in feedback here too. If you use this program often, let me know :
- I still wonder what you could be doing with it !
-
- Translate is © Copyright by Alain Raynaud (that's me !), but can be copyed and
- given freely. I can be reached at :
-
- Alain Raynaud
- SUPELEC
- Plateau de Moulon
- 91192 Gif Sur Yvette Cedex
- FRANCE
-
- E-Mail: Raynaud@Frese51.Bitnet
-